<template>
  <div class="container">
    <nuxt-link to="/msbd/classify"> 类别管理 </nuxt-link>
    <nuxt-link to="/users"> 用户管理 </nuxt-link>
    <nuxt-link to="/msbd"> 面试宝典 </nuxt-link>
    <nuxt-link to="/test/111"> 在线考试 </nuxt-link>
    <hr/>

    <div class="dlform" style="width:300px;background-color:white;padding:10px 20px 10px 10px;">
      <el-form  label-width="80px">
        <el-form-item label="">
          <h1>BK管理系统</h1>
        </el-form-item>
      <el-form-item label="用户：">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="密码：">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="记住：">
        <el-switch ></el-switch>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" >确定</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
    </div>


    <ul>
      <li v-for="(item,index) in list" :key="index">{{item.name}}</li>
    </ul>
  </div>
</template>

<script>
// import axios from '@nuxtjs/axios' 不用引入
export default {
  name: "Index",
  data() {
    return {
      a: 20,
      title: "23456",
      list:[],
      dialogFormVisible: true,
      formLabelWidth: '120px'
    };
  },
  fetch(){
    console.log(123)
  }
  // 类似生命周期钩子
  // asyncData({ $axios, req, res, error }) {
  //   // console.log(req,res)//undefined,undefined

  //   try {
  //     const { data } = $axios.get(
  //       "http://locahost:3001/users/user-list?pageSize=10"
  //     );
  //     // console.log(data);
  //     return {
  //       list: data.data
  //     };
  //   } catch (e) {
  //     error({ mag: "abc" });
  //   }
  // },

};
</script>

<style scoped>
.container {
  height: 100vh;
  background-color: rgb(241, 226, 229);
}
.dlform { 
  border-radius: 10px;
  position: relative;
  position: absolute;
  top: 30px;
  right: 30px;
}
</style>